Feature/52 av web#119
Conversation
* Temp * Fix * Fix UI element rendering * Use safe code * One more unsafe fix * Added error logging * Basic OpenAL implementation * #16 Remove unnecessary tester project * #26 Editor enhancements * #26 Context menu size fix and documentation * #26 Editor improvements * Method for opening multiple windows * Small refactoring * Opening SharpEngine windows works * UI improvements (WIP) A lot of stuff is unfinished. Context menu locations, launcher styling, xml documentation missing etc. Functionality should be working tho * Launcher UI improvements * Cleanup * Cleanup UIElement mesh data * Cleanup * Texturing improvements * Add basic layout placeholders * UI shader testing (WIP) * UI rendering works * Actual fix * Generalize functions * Fiddle with Transforms and types (WIP) * Midway solution (Not finished) * Getting there * Transform abstraction * UI element ortographic projection * Translating somewhat works * UI transform behaving correctly? * Add documentation / general enhancements * #2 Framing and rendering changes * Pop stash * #26 Fix build * #26 Fix flags * #26 Use width and height * #2 Temp * #2 loop working * #2 Refactoring Introduced obj loader, abstracted some functionality into separate projects, added placeholders for test projects * #2 Cleanup * #2 Separated Shader data container and extension methods * #2 Use correct ui shaders * #2 Fix absolute path bug * #2 Fix build (WIP) * #2 Cleanup * #2 Remove redundant interfaces * #2 More redundant interfaces * #2 More redundancies * #2 simplify data store * #2 Fixing readme details * #2 Simplify call * #2 Quality of life improvements * #2 Use mesh in obj loader * #2 Try map to old format * #2 Use Silk.NET example for debugging purposes * #2 Consolidate new changes * #67 Partial class definition * #2 Use Core Shader in tutorial * #2 Remove redundancies and plan merging * #2 Texture partial class * #2 Improve texture class * #2 Cleanup * #2 More cleanup * #2 Get rid of duplicates * #2 Reorganize content * #2 Using Core data types (Silk example no longer works) * #2 Intermediate state Both test projects work but the Model_Old is still required. * #73 Document issues * #73 Add missing issue links * #2 Use obsolete loader Let's use Model_Old for now to resolve the meshes. Later on once we are implementing the fbx stuff we can try to figure out again how to make the loader properly work. * #2 Using custom meshes in engine works * #2 A very bandaid solution for the obj renderer The implementation works but it's very hacky. This needs to fixed * #2 Cherrypick * #2 Tiny cleanup * #2 Shader issue? * #2 A very slow though "working" solution Textures still missing and the framerate is very bad * #2 Progress! * #2 Pop stash * #2 pop stash * #2 Cleanup IDisposables * #2 Cleanup * #2 Cleanup * #2 Pop stash * #2 A few warnings cleanup * #2 Try clean reliability ratings * #2 Light cleaning up * #2 Cleanup * #2 Fix * #52 gamification (#112) * #52 Modify folder structure * #52 Initial backend project * #52 Initial databases * #52 Temp arch in place --------- Co-authored-by: Antti Veikkolainen <anttiv@recastsoftware.com> --------- Co-authored-by: Antti Veikkolainen <antti.veikkolainen00@outlook.com> Co-authored-by: Antti Veikkolainen <anttiv@recastsoftware.com>
Co-authored-by: Antti Veikkolainen <antti.veikkolainen00@outlook.com>
#52 Fix project structure
on-behalf-of: @Azure opensource@microsoft.com
|
There was a problem hiding this comment.
Pull request overview
This PR introduces web-based UI infrastructure for the SharpEngine project, including a Portal web application, an Asset Store UI, and shared UI components. The changes establish the foundation for web-based interaction with the SharpEngine ecosystem by creating React-based frontends and supporting backend services. However, the PR description is incomplete (marked as TBD), making it difficult to assess whether all intended functionality has been implemented.
Key changes include:
- Creation of shared UI component library (
sharpengine-ui-shared) for code reuse across web applications - Portal web UI with authentication via Auth0 and basic navigation structure
- Asset Store UI with search functionality and asset browsing
- Shared C# DTOs and backend infrastructure to support the web applications
- Refactoring of project structure to centralize shared code
Reviewed changes
Copilot reviewed 113 out of 163 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| Shared/sharpengine-ui-shared/* | New shared React component library with types, API clients, and reusable components |
| Portal/sharpengine-web-ui/* | New Portal web application with Auth0 integration and navigation |
| AssetStore/asset-store-ui/* | New Asset Store frontend with search and asset display functionality |
| Shared/SharpEngine.Shared/* | Refactored shared DTOs moved from Engine to centralized location |
| Shared/SharpEngine.Rest/* | New REST client infrastructure for API communication |
| Shared/SharpEngine.Identity/* | New Auth0 client for authentication |
| Engine/* | Updated project references to use centralized shared code |
| Portal/Portal.Backend/* | New backend services including Azure Blob storage integration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // TODO: This should be moved to environment variables later since the values may change between environments | ||
| export const Routes = | ||
| { | ||
| AssetStore: "http://localhost:3000", | ||
| Portal: "http://localhost:3001", | ||
| } |
There was a problem hiding this comment.
Hardcoded localhost URLs should be moved to environment variables. This makes it difficult to configure different environments (development, staging, production) and could cause issues when deploying.
| public string Name { get; set; } | ||
| public string Url { get; set; } |
There was a problem hiding this comment.
Properties Name and Url should have default values or be marked as required to prevent null reference issues. Consider using 'required' keyword or providing default values like '= string.Empty;' or '= default!;'.
| public string Name { get; init; } | ||
| public string Description { get; init; } |
There was a problem hiding this comment.
Properties Name and Description should have default values or be marked as required to prevent null reference issues. Consider using 'required' keyword or providing default values like '= string.Empty;' or '= default!;'.
| public async Task Login() | ||
| { | ||
| // TODO: Create user (if not exists) when auth0 login done | ||
| // We need a copy of the user to link achievements | ||
| } |
There was a problem hiding this comment.
The Login method is defined but has no implementation beyond TODO comments. This creates a non-functional service method. Either implement the method properly or remove it if it's not ready for this PR.
| public UserId UserId { get; init; } | ||
| public string Username { get; init; } = default!; | ||
| public string Email { get; init; } = default!; | ||
| public string Auth0Identifier { get; init; } |
There was a problem hiding this comment.
The property Auth0Identifier lacks a default value or required modifier, which could lead to null reference issues given that nullable is enabled in the project. Add the required keyword or provide a default value.
| const [showDropdown, setShowDropdown] = useState(false); | ||
| const searchRef = useRef<HTMLDivElement>(null); | ||
|
|
||
| const { loginWithRedirect, logout, isAuthenticated, user } = useAuth0(); |
There was a problem hiding this comment.
Unused variable isAuthenticated.
| const [showDropdown, setShowDropdown] = useState(false); | ||
| const searchRef = useRef<HTMLDivElement>(null); | ||
|
|
||
| const { loginWithRedirect, logout, isAuthenticated, user } = useAuth0(); |
There was a problem hiding this comment.
Unused variable user.
| @@ -0,0 +1,70 @@ | |||
| import { useState } from 'react'; | |||
| import { useNavigate } from 'react-router-dom'; | |||
| import { ChevronDown, User } from 'lucide-react'; | |||
There was a problem hiding this comment.
Unused import User.
| export function Header() { | ||
| const navigate = useNavigate(); | ||
| const [isDropdownOpen, setIsDropdownOpen] = useState(false); | ||
| const [isLoggedIn] = useState(false); // Change this to true to simulate logged in state |
There was a problem hiding this comment.
Unused variable isLoggedIn.
|
|
||
| export function HeaderLogin({ onProfileClicked }: { onProfileClicked: () => void }) { | ||
|
|
||
| const { loginWithRedirect, logout, isAuthenticated, user } = useAuth0(); |
There was a problem hiding this comment.
Unused variable user.




<Issue number> <Change title>
Contents
This PR is trying to resolve:
TBD
We resolve it by:
TBD
Checklist
mainto my branch.